# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=direwolf
pkgver=1.7
pkgrel=0
pkgdesc="Software soundcard AX.25 packet modem/TNC and APRS encoder/decoder"
url="https://github.com/wb2osz/direwolf"
arch="all" # officially supported by upstream
license="GPL-2.0-or-later"
options="!check" # No test suite from upstream
makedepends="
	cmake
	alsa-lib-dev
	avahi-dev
	gpsd-dev
	hamlib-dev
	libudev-zero-dev
	"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/wb2osz/direwolf/archive/refs/tags/$pkgver.tar.gz"

build() {
	cmake -B build -DCMAKE_INSTALL_PREFIX=/usr

	make -C build
}

package() {
	make -C build DESTDIR="$pkgdir" install
	make -C build DESTDIR="$pkgdir" install-conf

	rm -r "${pkgdir:?}"/etc
	rm -r "${pkgdir:?}"/usr/share/doc/direwolf/*.pdf
}

sha512sums="
e09b14d7a036546e042da8b536b70d07f485d6a7224b19f5626b33e43a21c48200591fd6680ca1ee4b3c9fb5909d6f1c54ae8160877d51e06278fe19516abe1e  direwolf-1.7.tar.gz
"
